package com.some;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test360_02 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        String data = sc.nextLine();
        while (data.length() > 0) {
            String[] strs = data.split(" ");
            int a = Integer.parseInt(strs[0]);  //a个物体
            int b = Integer.parseInt(strs[1]);  //b个隔板
            int k = Integer.parseInt(strs[2]);  //一个箱子分成最多k个独立的隔间
            int v = Integer.parseInt(strs[3]);  //每个隔间只能放v个物体
            list.add(boxNums(a, b, k, v));
            data = sc.nextLine();
        }
        for (Integer integer : list) {
            System.out.println(integer);
        }
    }

    public static int boxNums(int a, int b, int k, int v) {
        int res = 0;
        int gejian = (a % v == 0 ? a / v : a / v + 1);
        int geban = ((gejian / k) * (k - 1)) + (gejian % k == 0 ? 0 : gejian % k - 1);

        if (geban <= b) {
            res = (gejian % k == 0 ? gejian / k : gejian / k + 1);
        } else {
            if (b % (k - 1) == 0) {
                res = b / (k - 1) + gejian - b / (k - 1) * k;
            } else {
                res = b / (k - 1) + 1 + gejian - b / (k - 1) * k - (b % (k - 1) + 1);
            }
        }
        return res;
    }

}

